﻿<?php
$ID 		= $_POST['_ID'];
$Name 		= $_POST['_Name'];
$Gender  	= $_POST['_Gender'];
$Birthday 	= $_POST['_Birthday'];
$Address	= $_POST['_Address'];
$Salary 	= $_POST['_Salary'];

echo 'Finish!!</br><a href="searchResult.php"> return to the Search Page.</a></br>';


$link=mysql_connect("localhost", "root" ,"1123");
mysql_select_db("dd") or die("No database");

$query = "update staff
		  set name = '".$Name."'
		  where ID = '".$ID."'";
mysql_query($query) or die("Error Message:".mysql_error());

$query = "update staff
		  set gender = '".$Gender."'
		  where ID = '".$ID."'";
mysql_query($query) or die("Error Message:".mysql_error());

$query = "update staff
		  set birthday = '".$Birthday."'
		  where ID = '".$ID."'";
mysql_query($query) or die("Error Message:".mysql_error());

$query = "update staff
		  set address = '".$Address."'
		  where ID = '".$ID."'";
mysql_query($query) or die("Error Message:".mysql_error());

$query = "update staff
		  set salary = '".$Salary."'
		  where ID = '".$ID."'";
mysql_query($query) or die("Error Message:".mysql_error());


mysql_close ($link);

?>